package com.bocloud.controller;

import com.bocloud.model.Result;
import com.bocloud.service.DepartmentService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value="/department")
public class DepartmentController {

	@Autowired
	DepartmentService departmentService;

	/**
	 * 用途：获取部门表中的所有数据
	 * @param
	 * @return Result
	 */
	@RequestMapping(value = "getalldem")
	@ResponseBody
	public Result getAllDepartment(){
		return new Result(true,departmentService.getAllDepartment(),"");
	}


}

